﻿using UnityEngine;
using System.Collections;

public class Menu : MonoBehaviour {
	//Game title
	private string text = "Game Dev Project";
	//GuiStyle to configuration of text
	private GUIStyle guiStyle = new GUIStyle();
	//Font size
	public int textFontSize = 20;
	//Font
	public Font font;
	//Text Color
	public Color textColor;

    // Is called before Start(). Great for references.
	void Awake()
	{
		//color white to text
		guiStyle.normal.textColor = Color.white;
		//relationn of var font
		guiStyle.font = font;
		//relation of var textFontSize
		guiStyle.fontSize = textFontSize;
	}

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
    //To text and buttons in screen
	void OnGUI ()
	{
		//Gui label to the text of the title and position
		GUI.Label(new Rect(Screen.width/2 - 50, Screen.height/2 - 200, 200, 200),text,guiStyle);
		//Begin of gui group,where have size and position
		GUI.BeginGroup(new Rect(Screen.width/2 - 50, Screen.height/2 - 100, 300, 300));
		//Gui color white
		GUI.color = Color.white;
		//if click in button
		if(GUILayout.Button("History",GUILayout.Width(150),GUILayout.Height(50)))
		{
			//Application.LoadLevel("history");
		}
		//if click in button 
		if(GUILayout.Button("Endurece Mode",GUILayout.Width(150),GUILayout.Height(50)))
		{
			//go to endurece mode
			Application.LoadLevel(1);
		}
		//if click in button 
		if(GUILayout.Button("Quit",GUILayout.Width(150),GUILayout.Height(50)))
		{
			//Exit of game
			Application.Quit();
		}
		//End of Gui Group
		GUI.EndGroup();
		
	}
}
